﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
using qiupeng.Public;
using System.IO;
using SafetyRecordData.Data.DAL;


public partial class Search_UserMessages : Base
{
    Db List = new Db();
    public static string CountsLabel, AllPageLabel, CurrentlyPageLabel, SqlStrStart, SqlStrMid, SqlStr, SqlStrStartCount, SqlStrCount;
    public string urlstr, keystr;
    public string CreateMidSql()
    {
        string MidSql = string.Empty;
        if (Request.QueryString["key"] != null)
        {
            if (Request.QueryString["username"] != null)
            {
                MidSql = MidSql + " and username like '%" + List.GetFormatStr(Server.UrlDecode(Request.QueryString["username"])) + "%'";
            }


            if (Request.QueryString["XingMing"] != null)
            {
                MidSql = MidSql + " and XingMing like '%" + List.GetFormatStr(Server.UrlDecode(Request.QueryString["XingMing"])) + "%'";
            }
        }

        return MidSql;

    }

    protected void Page_Load(object sender, EventArgs e)
    {
        
        if (!this.Page.IsPostBack)
        {
            
        }

    }


    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (this.txtUserName.Text.Trim() != "")
        {
            Response.Redirect("usermessagesdetail.aspx?username=" + this.txtUserName.Text + "&starttime=" + this.txtStartTime.Value + "&endtime=" + this.txtEndTime.Value + "");
        }
    }
}
